package com.cskaoyan.javase.homework;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * String的spilt方法演示
 * @since 09:28
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class TestSpilt {
    public static void main(String[] args) throws IOException {
        BufferedReader studs = new BufferedReader(new FileReader("students.txt"));
        String lineData = studs.readLine();
        System.out.println(lineData);
        String[] result = lineData.split(",");
        for (String s : result) {
            System.out.println(s);
        }
        for (String s : result) {
            String[] split = s.split("=");
            for (String s1 : split) {
                System.out.println(s1);
            }
        }
    }
}
